package com.ts;

//import com.google.gson.Gson;
import com.ts.proj.entity.SystemConstantEntity;
import com.ts.proj.service.SystemConstantService;
import com.ts.proj.service.SystemUserService;
import com.ts.util.PageData;
import com.ts.util.SpringContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpHeaders;
import org.springframework.web.client.RestTemplate;

import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.time.Duration;
import java.util.List;

@SpringBootApplication
//@EnableScheduling

public class WeighingApplication {

	@Autowired
	private static SystemUserService systemUserService;

	@Autowired
	private SystemConstantService systemConstantService;

	@Autowired
	private RestTemplateBuilder builder;

	@Bean
	public RestTemplate restTemplate() {
		return builder.build();
	}


	@Bean
	public HttpHeaders headers(){
		return new HttpHeaders();
	}

	public static void main(String[] args) {
		ApplicationContext app = SpringApplication.run(WeighingApplication.class, args);
		SpringContextUtil.setApplicationContext(app);
		System.setProperty("tomcat.util.http.parser.HttpParser.requestTargetAllow","|{}");
	}

}

